package com.atguigu.cloud.apis;

import com.atguigu.cloud.responce.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ Author：Aijinhui
 * @ Description：
 * @ Date：2024-06-03-17:22
 */
@FeignClient(value = "seata-storage-service")
public interface StorageFeignApi {
    /**
     * 给订单模块用，下订单之后需要扣减库存
     */
    @PostMapping(value = "/storage/decrease")
    ResultData decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
